using System;
using System.Diagnostics.Contracts;
using System.Web.UI;

namespace OpenWaves.ActivityFeed.Web.Controls
{
    public class TopicsFilterPlaceHolder : ListPlaceHolderBase
    {
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);
            var activityFeed = this.ParentActivityFeedBase;

            Contract.Assert(activityFeed.TopicsFilterTemplate != null, "TopicsFilterTemplate is required to render control.");
            WriteAttributes(writer, "getAvailableTopicsToFilter()", activityFeed.TopicsFilterSettings, activityFeed.TopicsFilterTemplate.ClientID, "topicsFilter");
        }
    }
}